// summary.component.ts
import { Component, Input } from '@angular/core';

@Component({
  selector: 'app-summary',
  templateUrl: './summary.component.html',
  styleUrls: ['./summary.component.css'],
})
export class SummaryComponent {
  @Input() formData: any = {
    // internName: '',
    // phone: '',
    // department: '',
    // mentorName: '',
    // evaluations: {
    //   relationship: '',
    //   planCommunication: '',
    //   jobUnderstanding: '',
    //   rulesIntroduction: '',
    //   workGuidance: '',
    //   dailyFeedback: '',
    //   skillTeaching: '',
    //   fairTreatment: '',
    // },
    // overallEvaluation: '',
    // suggestions: '',
    // signature: '',
    // date: '',
    internName: '张三',
    phone: '13800138000',
    department: '技术部-前端开发',
    mentorName: '李四',
    evaluations: {
      relationship: 1, //优 1，良 2， 一般 3
      planCommunication: 2,
      jobUnderstanding: 1,
      rulesIntroduction: 1,
      workGuidance: 2,
      dailyFeedback: 1,
      skillTeaching: 1,
      fairTreatment: 1,
    },
    overallEvaluation:
      '导师在实习期间提供了全面的指导和帮助，使我快速适应了工作环境并掌握了必要的技能。',
    suggestions: '希望导师能安排更多实际项目操作的机会。',
    signature: '张三',
    date: '2023-12-15',
  };

  getCheckMark(rating: number, currentValue: number): string {
    return rating === currentValue ? '✓' : '';
  }
  printForm() {
    window.print();
  }
}
